<template>
  <div class="text-center p-20">
    <img class="w-40 h-40" src="../assets/img/logo@3x.png" alt="" srcset="" />
    <h1 class="text-5xl mt-20">欢迎回来</h1>
    <p class="text-4xl mt-10">请输入账号信息进行登录</p>
    <div class="text-left mt-20 mb-20">
      <div class="mb-6 mt-6">账号</div>
      <c-input v-model="account.username" />
      <div class="mb-6 mt-6">密码</div>
      <c-input
        v-model="account.password"
        icon="icon-mima"
        placeholder="请输入密码"
      />
    </div>
    <van-button type="warning" block @click="handleLogin">登录</van-button>
  </div>
</template>

<script setup lang="ts">
import { reactive } from "vue";
import { useAccount } from "../store/user";
const user = useAccount();
const account = reactive({
  username: "三藏",
  password: "123",
});
const handleLogin = () => {
  console.log(account);
  user.userLoginAction(account); //触发登录
};
</script>

<style></style>
